FL Language Manual, Parts 1 and 2

FL is intended to be a programming language in which it is easy to write clear, concise, and efficient programs. FL is designed around a rich set of functionals, forms for combining existing programs to construct new ones. This emphasis on programming at the function level results in programs that have a rich mathematical structure useful in reasoning about and optimizing programs.

FL programs directly access 110 devices and the file system using primitive history-sensitive functions. An implicitly controlled history component provides this access without requiring I/O "streams" as explicit arguments of interactive programs.

FL programs can be higher-order. In addition to the primitive combining forms provided, the language provides powerful mechanisms for defining new higher-order functions. Conditional expressions and lambda expressions employ patterns. A pattern defines a predicate and selectors for objects having the same structure as the pattern, and it may contain arbitrary predicates for elements of that structure.

FL is statically scoped. An FL program consists of an expression together with an environment of function definitions used in evaluating that expression. The language provides a complete set of operations for combining environments, thus enhancing program reusability. For example, any environment may be modified to export only some of its definitions; this facility, together with those for building user data types, provides a powerful technique for defining abstract data types.

FL uses a simple concept of type in which types are identified with predicates for subsets of the value domain. The user may define new types in terms of existing ones. FL guarantees that all type errors are caught, although not all type errors are detected at compile time. For example, type errors involving stored or transmitted user defined types may be found at run time.

FL values include exceptions in addition to normal values (i.e., atoms, functions, sequences of values, and user defined objects). Exceptions contain information about their origin; they are generated when functions are applied to inappropriate arguments, and the user may produce them with the primitive signal. All functions preserve exceptions. The functional catch permits recovery from exceptions; it can be used with signal for backtracking.

The meaning of FL programs is specified by a denotational semantics that uses an unusually simple domain of values as its basis. This makes the denotational semantics a useful tool for the programmer as well as for the language analyst.

By: John Backus, John H. Williams, Edward L. Wimmers, Peter Lucas, Alexander Aiken

Published in: RJ7100 in 1989

LIMITED DISTRIBUTION NOTICE:

This Research Report is available. This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and specific requests. After outside publication, requests should be filled only by reprints or legally obtained copies of the article (e.g., payment of royalties). I have read and understand this notice and am a member of the scientific community outside or inside of IBM seeking a single copy only.

RJ7100.pdf

Questions about this service can be mailed to reports@us.ibm.com .